package com.cqd.service;

import com.cqd.entity.Stu;
import com.mongodb.client.result.DeleteResult;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.data.mongodb.core.query.Update;

import java.util.List;
import java.util.Map;

public interface StuService {

    //添加学生
    public String addStu(Map<String,Object> map,String collectionName);
    //修改学生
    public String updateStu(Query query, Update update,String collectionName);
    //删除
    DeleteResult delStu(Query query, String collectionName);
    //根据名称查询
    List<Stu> selectByName(String name);
    //年龄大于20的查询
    List<Stu> selectByAge(Integer age);
}
